package org.lifeaddict.sybill;
import java.util.ArrayList;
import java.util.Collections;


public class LvEvent {
	
	private String name;
	private ArrayList<LvEventDate> events;
	
	public LvEvent(String name) {
		this.name = name;
		this.events = new ArrayList<LvEventDate>();
	}
	
	public void addDate(LvEventDate in) {
		this.events.add(in);
		Collections.sort(events);
	}
	
	public ArrayList<LvEventDate> getDates() {
		return events;
	}
	
	public String getName() {
		return this.name;
	}
	
	public String toString() {
		String out = name + "\n";
		for(LvEventDate e : events) {
			out += e + "\n";
		}
		return out;
	}
}
